package com.inspinia.base.api.service;

import com.inspinia.base.api.dao.InterfaceUserExternalDao;
import com.inspinia.base.api.model.InterfaceUserExternal;
import com.inspinia.base.dao.BaseDao;
import com.inspinia.base.service.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
* 的服务层实现类
* Created by pujw on 2017-6-30.
*/
@Service
public class InterfaceUserExternalServiceImpl extends BaseServiceImpl<InterfaceUserExternal> implements InterfaceUserExternalService {
    @Resource
    private InterfaceUserExternalDao interfaceUserExternalDao;

    @Override
    protected BaseDao<InterfaceUserExternal> getDao() {
        return interfaceUserExternalDao;
    }
    
    @Transactional
    @Override
    public int batchDelete(Long[] ids){
    	return interfaceUserExternalDao.batchDelete(ids);
    }

    @Override
    public InterfaceUserExternal hasAuthority(Long userId, Long interfaceId) {
        return interfaceUserExternalDao.hasAuthority(userId,interfaceId);
    }

    @Override
    public List<InterfaceUserExternal> findAddrsByUserId(Long userId) {
        return interfaceUserExternalDao.findAddrsByUserId(userId);
    }

}
